<?php
/**
 * appRain v 0.1.x
 *
 * LICENSE
 *
 * This source file is subject to the MIT license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.opensource.org/licenses/mit-license.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@apprain.com so we can send you a copy immediately.
 *
 * @copyright  Copyright (c) 2010 appRain, Team. (http://www.apprain.com)
 * @license    http://www.opensource.org/licenses/mit-license.php MIT license
 *
 * HELP
 *
 * Official Website
 * http://www.apprain.com/
 *
 * Download Link
 * http://www.apprain.com/download
 *
 * Documents Link
 * http ://www.apprain.com/docs
 */
 ?>
<?php

    $admin_nav_def = $this->get_admin_nav();

    echo $this->get_tag('div',array("class"=>"introduction",'style'=>'width:90%'));

        foreach( $login_session['admin_panel_tabs'] as $key => $val){if(isset($admin_nav_def[$val]['child']))
        {
            // Featch admin link information
            $arr_root = $admin_nav_def[$val]['child'];
            if(!empty($arr_root))
            {
                foreach( $arr_root as $key1 => $val1)
                {
                    echo $this->get_tag("div",array("class" =>"p_ul"));
						$fetchType = 'URL';
						if(!empty($val1['adminicon']))
						{
							$fetchType = $val1['adminicon']['type'];
							$icon_path = $val1['adminicon']['location'];
						}
						else
						{
							$icon_path = '/images/admin/deshboard/' . App::Helper('utility')->text2Normalize($val1['title']) . '.jpg';
						}


                        if ( !file_exists($this->basedir("$icon_path")) && !file_exists($this->rootDir("$icon_path")) )
                        {
                            $fetchType = 'URL';
                            $icon_path = '/images/admin/deshboard/info.jpg';
                        }

						if(strtolower($fetchType) == 'url')echo $this->get_tag("div", array("class" =>"img"),App::load("Helper/Html")->imgTag($this->baseurl($icon_path),null,array("height"=>"75","width"=>"75")));
						else echo $this->get_tag("div", array("class" =>"img"),App::load("Helper/Html")->imgDTag($this->rootDir($icon_path),'/75/fix',array("height"=>"75","width"=>"75")));
						
						echo $this->get_tag("span",array("class" =>"text"));
                            echo $this->get_tag("strong",NULL,$val1['title']);
                            foreach($val1['items'] as $key2 => $val2)
                            {
                                if( $key2 < 3 )
                                {
                                    echo App::load("Helper/Html")->linkTag($this->baseurl($val2['link']),$val2['title']);
                                }
                            }
                        echo $this->get_tag('/span');
                    echo $this->get_tag('/div');
                }
            }
        }}
    echo $this->get_tag('/div');
?>